<?php
require_once PATH_SITE.'cn/royan/php/utils/writers/WriterUserSimple.writer.php';
require_once PATH_SITE.'cn/royan/php/utils/writers/AbstractWriter.abstract.php';
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of WriterUserList
 *
 * @author yanr
 */
class WriterUserList extends AbstractWriter
{
    //put your code here
    public function __construct( $room )
    {
        $this->object = $room;
    }
    
    public function write()
    {
        $users = array();
        $list = $this->object->__get("users");
        FOR( $i = 0; $i < count( $list ); $i++ )
        {
            $writerUserSimple = new WriterUserSimple( $list[$i] );
            array_push( $users, $writerUserSimple->write() );
        }
        RETURN $users;
    }
}
?>